# Create your models here.
from django.db import models

# Create your models here.
from zhenghanshu2.utils.models import BaseModel


class Car(BaseModel):
    """歌名"""
    # upload_to 存储子目录，真实存放在地址会使用配置中的MADIE_ROOT+upload_to
    car_image = models.CharField(max_length=500, verbose_name='车的图片', null=True, blank=True, help_text="图片大小无要求")
    car_name = models.CharField(max_length=150, verbose_name='车的名字')
    car_price = models.CharField(max_length=150, verbose_name='车的价格')
    introduce = models.TextField(max_length=2048, verbose_name="详情介绍", null=True, blank=True)
    howManyToBuy = models.IntegerField(verbose_name="购买人数", default=0)

    class Meta:
        db_table = 'taobao_car'
        verbose_name = '豪车编译'
        verbose_name_plural = verbose_name

    def __str__(self):
        return "%s" % self.car_name

